// 这里面负责写路由映射，便于管理


// 引入路由模块并使用它
// import Vue from 'vue'
import VueRouter from 'vue-router'
// Vue.use(VueRouter)
const A = () => import( /* webpackChunkName: "aaa" */ '@/components/a')
const B = () => import( /* webpackChunkName: "bbb" */ '@/components/b')
// 创建路由实例并配置路由映射  
// path:'*',redirect:'/home'  重定向到path是/home的映射
const router = new VueRouter({
    routes: [
        {
            path: '/a',
            component: A
        },
        {
            path: '/b',
            component: B
        },
        {
            path: '*',
            redirect: '/a'

        }
    ]
})


// 输出router
export default router;